package com.jams.goodox.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

import com.jams.goodox.R;

/**
 * Created by Jin on 6/29/2016.
 * Description 能点击状态切换的textview
 */
public class VisageBeastTextView extends TextView {

	private boolean isCanClick = false;

	public VisageBeastTextView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public void setCannotClick() {
		isCanClick = true;
		this.setBackgroundResource(R.drawable.bottom_btn_2dp_main);
	}

	public void setCanClick() {
		isCanClick = true;
		this.setBackgroundResource(R.drawable.bottom_btn_2dp_main);
	}

	public void resetClickable(boolean isCanClick) {
		if (isCanClick) setCanClick();
		else setCannotClick();
	}

	public boolean isCanClick() {
		return isCanClick;
	}

}
